﻿using System.Net.Sockets;
using eLoop;

namespace eNets.CBK.Sockets;

static class SocketProvider
{
    public static TcpSocketAccOper CreateTcpAccOper(Socket socket, ITaskScheduler scheduler, SocketCompletedDelegate notify)
    {
        return new TcpSocketAccOper(socket, scheduler, notify);
    }

    public static TcpSocketCntOper CreateTcpCntOper(Socket socket, ITaskScheduler scheduler, SocketCompletedDelegate notify)
    {
        return  new TcpSocketCntOper(socket, scheduler, notify);
    }

    public static TcpSocketRcvOper CreateTcpRcvOper(Socket socket, ITaskScheduler scheduler, SocketCompletedDelegate notify)
    {
        return new TcpSocketRcvOper(socket, scheduler, notify);
    }

    public static TcpSocketSndOper CreateTcpSndOper(Socket socket, ITaskScheduler scheduler, SocketCompletedDelegate notify)
    {
        return new TcpSocketSndOper(socket, scheduler, notify);
    }

    public static UdpSocketRcvOper CreateUdpRcvOper(Socket socket, ITaskScheduler scheduler, SocketCompletedDelegate notify)
    {
        return new UdpSocketRcvOper(socket, scheduler, notify);
    }

    public static UdpSocketSndOper CreateUdpSndOper(Socket socket, ITaskScheduler scheduler, SocketCompletedDelegate notify)
    {
        return new UdpSocketSndOper(socket, scheduler, notify);
    }
}